<?php foreach($list as $key=>$element )://循环每一行的数据?>
<tr target="id" rel="<?php echo $element['id'];?>" class='unlimitedList' left_number="<?php echo $element['left_number'];?>"  right_number="<?php echo $element['right_number'];?>" level="<?php echo $element['level'];?>" parent_id="<?php echo $element['parent_id'];?>">
       <?php foreach($templateDisplayColumns as $columnName): //循环每一个在列表中显示的字段?>
       		<?php if($columnName=='name')://如果字段名称等于name值就进行额外处理?>
       			<td>
       			    
       			    <?php if($selectType=='leaf'):?>
       			    
       			        <?php if($element['right_number']-$element['left_number']==1):?>
       			    			<?php if($selectControlType=='checkbox'):?>
	       							<div class='checkbox'>
				        				<input type='checkbox' name='group'   value="<?php echo sprintf("{'%s':'%s','name':'%s'}",$name,$element['id'],$element['name']);?>"  />
				    				</div>
				       		 	<?php elseif($selectControlType=='radio'):?>
				        			<div class='radio'>
				        				<input type='radio'    name='group'   value="<?php echo sprintf("{'%s':'%s','name':'%s'}",$name,$element['id'],$element['name']);?>"  />
				    				</div>
				        	 	<?php endif;?>
       			        
       			        <?php endif;?>
       			    
       			    
       			    <?php elseif($selectType='both'):?>
       			    
	       			    <?php if($selectControlType=='checkbox'):?>
	       					<div class='checkbox'>
				        		<input type='checkbox'  name='group'   value="<?php echo sprintf("{'%s':'%s','name':'%s'}",$name,$element['id'],$element['name']);?>"  />
				    		</div>
				        <?php elseif($selectControlType=='radio'):?>
				        	<div class='radio'>
				        		<input type='radio' 	name='group'   value="<?php echo sprintf("{'%s':'%s','name':'%s'}",$name,$element['id'],$element['name']);?>"  />
				    		</div>
				        <?php endif;?>
       			    
       			    <?php endif;?>
       			    
       			    <div class='item'><?php echo $element[$columnName];?></div>
       			    
       			</td>
       		
       		<?php else:?>
       		
       			<td><?php echo $element[$columnName];?></td>
       			
       		<?php endif;?>
       		
       		
       <?php endforeach;//循环在模板中显示字段列表结束?>
</tr>
<?php endforeach;//循环每一行的数据结束?>
